// home_3
#include<iostream>
unsigned int factorial( unsigned int val );

int main()
{
	unsigned int number=0;
	double result=1;
	int n=0;

	std::cout << "Enter  possitive integer :";
	std::cin >> n;
	if( n<=0 )
	{
	std::cout << "You are enter negative(or 0) number";
	}
	else
	{
	for( int i=n; i>=1; --i )
	{
	result+= 1.0 / factorial(i);
	}
	}

	std::cout << "Result is: " << result << std::endl;
	
	return 0;
}
unsigned int factorial( unsigned int val )
{
if( val <= 1 )
	return 1;
else
return val * factorial(val-1);
}
